#ifndef DIALOGNN_H
#define DIALOGNN_H

#include <QDialog>
#include <QProcess>
namespace Ui {
	class DialogNN;
}

class DialogNN : public QDialog
{
	Q_OBJECT

public:
	explicit DialogNN(QWidget *parent = 0);
	~DialogNN();
protected:
	void timerEvent(QTimerEvent * evt);

private slots:
	void on_toolButton_br_proj_clicked();
	void on_toolButton_br_features_clicked();
	void on_toolButton_br_NN_clicked();

	void on_pushButton_trainning_clicked();
	void on_lineEdit_projpath_textChanged(const QString &arg1);

	void slot_readyReadOutput();
	void slot_readyReadErr();
	void slot_finished(int code);
	void slot_started();

	void board_readyReadOutput();
	void board_readyReadErr();
	void board_finished(int code);
	void board_started();

	void on_pushButton_stop_clicked();
private:
	Ui::DialogNN *ui;
	QProcess * m_process;
	QProcess * m_processBoard;
	int m_nTimer;
	int m_nPort = 19200;
protected:
	QString getFilePath(QString title,QString prefix, QString filter, bool bOpen) ;
	void saveIni();
	void loadIni();
	void readPrj();
	void savePrj();
};

#endif // DIALOGNN_H
